package com.xhsemoticonskeyboard.my_diy_keyboard;

import android.content.Context;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.xhsemoticonskeyboard.R;
import com.xhsemoticonskeyboard.common.data.ImMsgBean;

import java.util.List;


public class My_Diy_ChatBaseQuickAdapter extends BaseQuickAdapter<ImMsgBean, BaseViewHolder> {
    Context context;


    public My_Diy_ChatBaseQuickAdapter(@Nullable List<ImMsgBean> data) {
        super(R.layout.listitem_cha_left_text, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ImMsgBean item) {
        if (context==null) {
            context = helper.itemView.getContext();
        }

        TextView tv=helper.getView(R.id.tv_content);
        My_Diy_EmotionsUtils.spannableEmoticonFilter(tv,item.getContent());

        //helper.setText(R.id.tv_content,item.getContent());
    }
}
